//------------------------------------------------------------
// 事件参数类 - 基于EventType枚举
//------------------------------------------------------------

using UnityEngine;

/// <summary>
/// 选择植物事件参数
/// </summary>
public class SelectPlantEventArgs : GameEventArgs
{
    public override int Id => (int)EventType.SELECT_PLANT;

    public Plant Plant { get; set; }

    public override void Clear()
    {
        Plant = null;
    }
}

/// <summary>
/// 添加植物事件参数
/// </summary>
public class AddPlantEventArgs : GameEventArgs
{
    public override int Id => (int)EventType.ADD_PLANT;

    public Plant Plant { get; set; }
    public Vector3 Position { get; set; }

    public override void Clear()
    {
        Plant = null;
        Position = Vector3.zero;
    }
}

/// <summary>
/// 实体受到伤害事件参数
/// </summary>
public class EntityTakeDamageEventArgs : GameEventArgs
{
    public override int Id => (int)EventType.ENTITY_TAKE_DAMAGE;

    public Entity Entity { get; set; }
    public long Damage { get; set; }
    public Entity Attacker { get; set; }

    public override void Clear()
    {
        Entity = null;
        Damage = 0;
        Attacker = null;
    }
}

/// <summary>
/// 实体死亡事件参数
/// </summary>
public class EntityDeathEventArgs : GameEventArgs
{
    public override int Id => (int)EventType.ENTITY_DEATH;

    public Entity Entity { get; set; }
    public Entity Killer { get; set; }

    public override void Clear()
    {
        Entity = null;
        Killer = null;
    }
}

/// <summary>
/// 实体攻击事件参数
/// </summary>
public class EntityAttackEventArgs : GameEventArgs
{
    public override int Id => (int)EventType.ENTITY_ATTACK;

    public Entity Attacker { get; set; }
    public Entity Target { get; set; }
    public float Damage { get; set; }

    public override void Clear()
    {
        Attacker = null;
        Target = null;
        Damage = 0f;
    }
}

/// <summary>
/// 实体移动事件参数
/// </summary>
public class EntityMoveEventArgs : GameEventArgs
{
    public override int Id => (int)EventType.ENTITY_MOVE;

    public Entity Entity { get; set; }
    public Vector3 OldPosition { get; set; }
    public Vector3 NewPosition { get; set; }

    public override void Clear()
    {
        Entity = null;
        OldPosition = Vector3.zero;
        NewPosition = Vector3.zero;
    }
}

/// <summary>
/// 实体治疗事件参数
/// </summary>
public class EntityHealEventArgs : GameEventArgs
{
    public override int Id => (int)EventType.ENTITY_HEAL;

    public Entity Entity { get; set; }
    public long HealAmount { get; set; }

    public override void Clear()
    {
        Entity = null;
        HealAmount = 0;
    }
}

/// <summary>
/// Buff添加事件参数
/// </summary>
public class BuffAddedEventArgs : GameEventArgs
{
    public override int Id => (int)EventType.BUFF_ADDED;

    public Entity Entity { get; set; }
    public BuffBase Buff { get; set; }

    public override void Clear()
    {
        Entity = null;
        Buff = null;
    }
}

/// <summary>
/// Buff移除事件参数
/// </summary>
public class BuffRemovedEventArgs : GameEventArgs
{
    public override int Id => (int)EventType.BUFF_REMOVED;

    public Entity Entity { get; set; }
    public BuffBase Buff { get; set; }

    public override void Clear()
    {
        Entity = null;
        Buff = null;
    }
}

/// <summary>
/// Buff更新事件参数
/// </summary>
public class BuffUpdatedEventArgs : GameEventArgs
{
    public override int Id => (int)EventType.BUFF_UPDATED;

    public Entity Entity { get; set; }
    public BuffBase Buff { get; set; }

    public override void Clear()
    {
        Entity = null;
        Buff = null;
    }
}

/// <summary>
/// 实体法力恢复事件参数
/// </summary>
public class EntityManaRestoreEventArgs : GameEventArgs
{
    public override int Id => (int)EventType.ENTITY_MANA_RESTORE;

    public Entity Entity { get; set; }
    public float ManaAmount { get; set; }

    public override void Clear()
    {
        Entity = null;
        ManaAmount = 0f;
    }
}

/// <summary>
/// 实体复活事件参数
/// </summary>
public class EntityReviveEventArgs : GameEventArgs
{
    public override int Id => (int)EventType.ENTITY_REVIVE;

    public Entity Entity { get; set; }

    public override void Clear()
    {
        Entity = null;
    }
}

/// <summary>
/// 阳光生产事件参数
/// </summary>
public class SunProducedEventArgs : GameEventArgs
{
    public override int Id => (int)EventType.SUN_PRODUCED;

    public Sun Sun { get; set; }
    public Vector3 Position { get; set; }

    public override void Clear()
    {
        Sun = null;
        Position = Vector3.zero;
    }
}

/// <summary>
/// 阳光收集事件参数
/// </summary>
public class SunCollectedEventArgs : GameEventArgs
{
    public override int Id => (int)EventType.SUN_COLLECTED;

    public Sun Sun { get; set; }
    public int SunValue { get; set; }

    public override void Clear()
    {
        Sun = null;
        SunValue = 0;
    }
}

/// <summary>
/// 添加阳光值事件参数
/// </summary>
public class AddSunPowerEventArgs : GameEventArgs
{
    public override int Id => (int)EventType.ADD_SUN_POWER;

    public int SunValue { get; set; }

    public override void Clear()
    {
        SunValue = 0;
    }
}

/// <summary>
/// 更新阳光值事件参数
/// </summary>
public class UpdateSunPowerEventArgs : GameEventArgs
{
    public override int Id => (int)EventType.UPDATE_SUN_POWER;

    public int CurrentSunPower { get; set; }
    public int DeltaSunPower { get; set; }

    public override void Clear()
    {
        CurrentSunPower = 0;
        DeltaSunPower = 0;
    }
}

/// <summary>
/// 阳光归还到对象池事件参数
/// </summary>
public class SunReturnToPoolEventArgs : GameEventArgs
{
    public override int Id => (int)EventType.SUN_RETURN_TO_POOL;

    public Sun Sun { get; set; }

    public override void Clear()
    {
        Sun = null;
    }
}

